<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<link rel="stylesheet"  type="text/css"  href="bootstrap.css" >
<html>
<head>
    <meta charset="utf-8">
    <title>Title</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        html {
            height: 100%;
        }
        body {
            background:url(https://img.51miz.com/Element/00/59/33/44/6766b1bb_E593344_6baa5e03.jpg)no-repeat center center;
            height: 100%;
            width: 100%;
            background-size:cover;
            position:absolute;
            left:0;
            top:0
        }
    </style>
</head>
<body>
<div class="container">
        <center>
            <h3>欢迎使用成绩管理系统</h3>
        </center>
        <div>
            <table id="table1" class="table table-hover">

            </table>
        </div>
</div>
</body>
</html>
<script>
    $(function () {
        show();
    })
    function show(){
        $.ajax({
            url: "findAllKecheng",
            type: "post",
            async: false,
            cache: false,
            dataType: "json",
            "success": function (json) {
                var var1 = '';
                var1 = var1+'<tr>';
                var1 = var1+'<th>课程名称</th>';
                var1 = var1+'</tr>';
                for(var i=0;i<json.length;i++){
                    var obj = json[i];
                    var1 = var1+'<tr>';
                    var1 = var1+'<td>'+obj.mingcheng+'</td>';
                    var1 = var1+'</tr>';
                }
                $("#table1").html(var1);
            }
        });
    }
</script>